package com.hzcc.tagmanagesystemapi.common.enums;

import com.hzcc.tagmanagesystemapi.common.ResultResponse;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Author 早睡蛋
 * @Date 2022/5/22 13:24:19
 *
 * @Desc:api文档枚举类
 */

@Getter
@AllArgsConstructor
public enum ApiFileEnums {

    OK(200,"success"),
    isADD(200,"上传成功"),
    noADD(400,"上传失败"),
    isUPDATE(200,"更新成功"),
    noUPDATE(400,"更新失败"),
    isDELETE(200,"删除成功"),
    noDELETE(400,"删除失败"),
    NAMEisNULL(400,"接口名字不能为空"),
    NAMEisEXISTED(400,"接口已存在");

    ApiFileEnums(int code, String message) {
        this.resultResponse =  ResultResponse.defaultResultResponse();
        resultResponse.setCode(code);
        resultResponse.setMessage(message);
    }

    public int getCode(){
        return resultResponse.getCode();
    }

    public String getMessage(){
        return resultResponse.getMessage();
    }

    public ResultResponse getResultResponse() {
        return resultResponse;
    }


    private final ResultResponse resultResponse;
}
